Attribute Values Types

Common Values Types

Here is the list of all types of values for the attributes of the elements of Blue Cat's skinning language.

Type Syntax Examples Comment

identifier

Any alphanumeric or '_' character, without space.

'myControl', 'slider1','param_slider'

'my Control' is an invalid identifier since it contains a space character.

string

Any character

Hello!


color

RGB hexadecimal value preceded by '#'

'#ffffff' for white, '#ff0000' for red.

This is the same syntax as HTML colors.

boolean

'true' or 'false'



Real number

digits.digits

'5.3' '10' '3.02' '0.4'

The language only supports English notation with '.' as delimiter.

Parameter type

'real' or 'boolean' or 'integer'


Real stands for real number in floating point notation (5.3)

Number of pixels

Any positive integer value

145


percentage

Real number followed by '%'

'20%' '33.3%'


Position in pixels

Any integer value

-5


Vertical alignment

'top' or 'bottom' or 'center'



Horizontal alignment

'left' or 'right' or 'center'



orientation

'vertical' or 'horizontal'

'vertical'


graph type

'curve' or 'bargraph'

'bargraph'

The bargraph style displays bars from the origin of the graph to the value of the curve, whereas the curve style draws curve points connected by segments in the case of non continuous curves.

pen style

'solid', 'dash', 'dot', 'dash_dot' or 'dash_dot_dot'

'dash_dot'


file path

Relative file path. The root of all paths is the skin file directory.

'xxx.bmp', or 'images\xxx.bmp'


Image file path

See file path


Supported formats:

bmp (8,16 or 24 bits). For more information see the about images section.

Cursor path

Valid cursor path or 'system::xxx' where xxx is a valid cursor type.

System::hand or 'mycursor.cur'

For more information, see the about cursors section

Parameter identifier

dsp.inputxxx or dsp.outputxxx where xxx is the parameter index (from 0 to number of parameters-1). (inputxxx or outputxxx for v1.0), or 'yyyy.zzzz' where 'zzzz' is the name of an exposed parameter of the 'yyyy' object.

'input0' or 'output3'

The parameters list of the plug-in is usually available in the plug-in documentation. If not the parameters can be seen in the host automation properties.

Curve identifier

dsp.output_curvexxx where xxx is the curve index (from 0 to number of curve-1)

'output_curve0'

The curves list of the plug-in is available in the plug-in documentation.

String with parameter fields

String containing fields enclosed into brackets

'the value is: {value} {unit}'

Valid fields are the following:

{value}, {unit}, {name}, {default}, {min}, {max}, {comment} and (V1.3.4) {text_value}

Parameter value formatting

Flag|max_char|.digits (all fields are optional), where:

Flag values (can be mixed):

  • '+' to show a '+' when the value is positive

  • blank (' ') : positive values start with a blank

  • '0' : value is padded with 0s. Valid only if followed by the max_char field.

max_char is the maximum number of characters to use for the text (sign and '.' included)

'.' followed by digits: number of characters reserved for the decimal part

'+8.2' will show a number with its sign, with a maximum of 8 characters (including '.') and 2 characters reserved for the digits

'.0' will show a number without decimal part.

'+05.0' will show a value with 5 characters without any decimal part, padded with '0' if needed.

Using the max_char field avoids the text to move on the screen when the value changes if you used a fixed size font such as 'Courier New'.

For programmers, the syntax is very similar to the formatting options of 'printf' standard c function.


response curve

A value in this list: 'linear' 'log' 'exp' 'log1' 'exp1' 'log2' 'exp2' 'log3' 'exp3' 'square_root' 'square'


See the graphes below for a more explicit view of the different curves.


influence of the 'response_curve' attribute - exp & log


influence of the 'response_curve' attribute - square & square_root

About Formulas

The Language supports mathematical formulas for several purposes (attributes computation, curves or surfaces defined with formulas etc.). The syntax is similar to common mathematical notations on computer systems. Example:

  3*x^2+cos(pi/2)*x+1

The language supports most common operators (*,/,+,-,^) as well as several predefined mathematical functions. The complete list is available below:

Symbol Operation Example Comment

+

Addition

x+1


*

Multiplication

x*y


-

Substraction

5-z


/

Division

x/2


^

Power

a^2 represents "a square"


%

Modulo

x%5 means "x modulo 5"


==

Equals

a==b means "a equals b" and the result is true or false

You can also use '='

!=

Not Equals

a!=b means "a does not equal b" and the result is true or false

You can also use '<>'

<

Lower than

a<b means "a stricly lower than b" and the result is true or false


>

Greater than

a>b means "a stricly greater than b" and the result is true or false


<=

Lower than or equal

a<=b means "a lower than or equal to b" and the result is true or false


>=

Greater than or equal

a>=b means "a greater than or equal to b" and the result is true or false


||

Boolean "OR"

a||b means "a or b"

You can also use 'or' (case sensitive).

&&

Boolean "AND"

a&&b means "a and b"

You can also use 'and' (case sensitive).

!

Boolean "NOT"

!(x==y) is equivalent to "x!=y" and means "x is not equal to y"

You can also use 'not' (case sensitive).

sqrt

Square root

sqrt(2)


abs

Absolute value

abs(-1) equals to 1


floor

Rounds to lowest integer

floor(1.25) equals to 1


ceil

Rounds to highest integer

ceil(1.25) equals to 2


round

Rounds to closest integer

round(1.25) equals to 1, and round(1.75) equals to 2


sin

sine

sin(pi)


cos

cosine

cos(x)


tan

tangent

tan(2*pi*x)


exp

Exponential

exp(10)


log

Logarithm

log(1) is equal to 0


sinh

Hyperbolic sine

sinh(pi)


cosh

Hyperbolic cosine

cosh(x)


tanh

Hyperbolic tangent

tanh(x)


pi

Pi Constant (3.14159...)

cos(pi) is equal to -1